package com.iodemo;

import java.io.*;

public class OutputWriteTest {
    public static void main(String[] args) {
        OutputStream os = null;
        OutputStreamWriter osw= null;
            try {
                os = new FileOutputStream("/Users/edy/Desktop/file/1.txt",true);
                osw = new OutputStreamWriter(os,"UTF-8");
                osw.write("我是中国人！！！！！！");
                osw.flush();
            } catch (FileNotFoundException | UnsupportedEncodingException e) {
                e.printStackTrace();
            } catch (IOException e) {
                e.printStackTrace();
            }finally {
                IOUntilsDemo.close(osw);
                IOUntilsDemo.close(os);
            }

    }
}
